<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">
<ui:define name="head">
    <script type="text/javascript" src="#{request.contextPath}/UI/support/pub.js"/>
    <script type="text/javascript" language="javascript">
        document.onkeydown = function TabReplace() {
            if (event.keyCode == 13) {
                if (event.srcElement.tagName != 'BUTTON')
                    event.keyCode = 9;
                else
                    event.srcElement.click();
            }
        }
    </script>
    <style type="text/css">
        .c_c {
            background: gray;
        }
    </style>
</ui:define>
<ui:define name="content">
    <div style="margin:5px;">
        <h:form id="form">
            <p:growl id="msgs" showDetail="false"/>
            <p:panel id="inputItemHieRelap" header="总包合同数量_计量查询" style="width: 100%">
                <h:panelGrid columns="2" style="width: 100%">
                    <h:panelGrid id="pgItemHieRelapInput" widgetVar="wvItemHieRelap"
                                 columns="8" style="width: 100%">

                        <h:outputLabel for="noItemHieRelap" value="编号:"/>
                        <h:inputText id="noItemHieRelap"
                                     value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_StrNo}"
                                     style="font-weight:bold;background-color:gainsboro"
                                     disabled="true">
                        </h:inputText>

                        <h:outputLabel for="name" value="名称:"/>
                        <h:inputText id="name" value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_Name}"
                                     style="font-weight:bold;background-color:gainsboro"
                                     disabled="true"/>

                        <h:outputLabel for="note" value="备注内容:"/>
                        <h:inputTextarea id="note"
                                         value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_Note}"
                                         rows="1" autoResize="false"
                                         style="font-weight:bold;background-color:gainsboro"
                                         disabled="true"/>

                        <h:outputLabel for="unitItemInfo" value="单位:"/>
                        <h:inputText id="unitItemInfo"
                                     value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_Unit}"
                                     style="font-weight:bold;background-color:gainsboro"
                                     disabled="true"/>

                        <h:outputLabel for="contractQuantityItemInfo" value="工程量:"/>
                        <h:inputText id="contractQuantityItemInfo"
                                     value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_ContractQuantity}"
                                     style="font-weight:bold;background-color:gainsboro;text-align:right;float:left;"
                                     disabled="true">
                            <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                        </h:inputText>

                        <h:outputLabel for="eng_BeginToCurrentPeriodEQty" value="材料累计供应数量:"/>
                        <h:inputText id="eng_BeginToCurrentPeriodEQty"
                                     value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.eng_BeginToCurrentPeriodEQty}"
                                     style="font-weight:bold;background-color:gainsboro;text-align:right;float:left;"
                                     disabled="true">
                            <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                        </h:inputText>

                        <h:outputLabel for="eng_CurrentPeriodEQty" value="当期材料供应数量:"/>
                        <h:inputText id="eng_CurrentPeriodEQty"
                                     value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.eng_CurrentPeriodEQty}"
                                     style="font-weight:bold;text-align:right;float:left">
                            <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                            <p:ajax event="blur" update="msgs,eng_BeginToCurrentPeriodEQty"
                                    listener="#{itemHieRelapStlEngMeaAction.blurEng_CurrentPeriodEQty('blur')}"/>
                        </h:inputText>

                        <h:outputLabel for="signPartAPriceItemInfo" value="分包材料单价:"/>
                        <h:inputText id="signPartAPriceItemInfo"
                                     value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_SignPartAPrice}"
                                     style="font-weight:bold;background-color:gainsboro"
                                     disabled="true">
                            <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                        </h:inputText>

                    </h:panelGrid>
                    <h:panelGrid id="pgInputBlur" columns="8" rendered="false">
                        <h:outputLabel for="pkidItemHieRelap" value="Pkid:"/>
                        <h:inputTextarea id="pkidItemHieRelap"
                                         value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_Pkid}"
                                         style="font-weight:bold;width:200px"
                                         disabled="true"/>
                        <h:outputLabel for="parentPkidItemHieRelap" value="父层Pkid:"/>
                        <h:inputTextarea id="parentPkidItemHieRelap"
                                         value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_ParentPkid}"
                                         style="font-weight:bold;width:200px"
                                         disabled="true"/>
                        <h:outputLabel for="itemPkidItemHieRelap" value="项Pkid:"/>
                        <h:inputTextarea id="itemPkidItemHieRelap"
                                         value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_ItemPkid}"
                                         style="font-weight:bold;width:200px"
                                         disabled="true"/>
                        <h:outputLabel for="correspondingPkidItemHieRelap" value="对应Pkid:"/>
                        <h:inputTextarea id="correspondingPkidItemHieRelap"
                                         value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_CorrespondingPkid}"
                                         style="font-weight:bold;width:200px"
                                         disabled="true"/>
                        <h:outputLabel for="gradeItemHieRelap" value="层号:"/>
                        <h:inputText id="gradeItemHieRelap"
                                     value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_Grade}"
                                     style="font-weight:bold"
                                     disabled="true"/>
                        <h:outputLabel for="orderidItemHieRelap" value="序号:"/>
                        <h:inputText id="orderidItemHieRelap"
                                     value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstruct.tkctt_Orderid}"
                                     style="font-weight:bold"
                                     disabled="true"/>
                    </h:panelGrid>
                </h:panelGrid>
            </p:panel>
            <p:ajaxStatus style="width:16px;height:16px;">
                <f:facet name="start">
                    <h:graphicImage value="/images/ajaxloading.gif"/>
                </f:facet>
                <f:facet name="complete">
                    <h:outputText value=""/>
                </f:facet>
            </p:ajaxStatus>

            <p:dataTable id="ptt" style="width:100%;"
                         value="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstructList}"
                         var="record"
                         rowKey="#{record.tkctt_Pkid}"
                         selection="#{itemHieRelapStlEngMeaAction.stlTkcttEngSMConstructSelected}"
                         selectionMode="single"
                         paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink}
                                                {LastPageLink} {RowsPerPageDropdown}"
                         paginator="true"
                         paginatorPosition="bottom"
                         rows="100"
                         rowsPerPageTemplate="200,100,50,40,30,20,10"
                         rowIndexVar="row"
                         emptyMessage="数据记录为空..."
                         stickyHeader="#{itemHieRelapStlEngMeaAction.strStickyHeaderFlag}">
                <p:column headerText="序号">
                    <h:outputText value="#{row + 1}"/>
                </p:column>

                <p:column style="width:100px" headerText="编号">
                    <h:outputText value="#{record.tkctt_StrNo}" escape="false"/>
                </p:column>

                <p:column style="width:200px" headerText="名称">
                    <h:outputText value="#{record.tkctt_Name}"/>
                </p:column>

                <p:column style="width:30px" headerText="单位">
                    <h:outputText value="#{record.tkctt_Unit}" style="text-align:right"/>
                </p:column>

                <p:column style="width:80px" headerText="合同数量">
                    <h:outputText value="#{record.tkctt_ContractQuantity}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>

                <p:column style="width:80px" headerText="合同金额">
                    <h:outputText value="#{record.tkctt_ContractAmount}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="开累工程数量">
                    <h:outputText value="#{record.eng_BeginToCurrentPeriodEQty}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="开累工程金额">
                    <h:outputText value="#{record.eng_BeginToCurrentPeriodEAmount}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="当期工程数量">
                    <h:outputText value="#{record.eng_CurrentPeriodEQty}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>

                <p:column headerText="当期工程金额">
                    <h:outputText value="#{record.eng_CurrentPeriodEAmount}" style="float: right">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:outputText>
                </p:column>
            </p:dataTable>
        </h:form>
    </div>
</ui:define>
</ui:composition>